package com.hualan.dao;

import com.hualan.bean.AssociateShop;
import com.hualan.bean.PanghuCommunity;
import com.hualan.bean.PanghuShop;

import java.util.List;

public interface CommunityDao {

    //1.增加小区---主键不重复即id不重复
    //获取用户输入的id,如果已经存在则不能新增,如果存在则可以新增

    //通过id查询小区,看id所对应的小区是否为null

    //新增小区
    int addCommunity(PanghuCommunity community);

    //2.根据id修改小区信息-id作为主键不修改
    int updateCommunity(PanghuCommunity community);

    //3.根据id删除小区
    int deleteCommunityById(int id);

    //4.按照分页查询小区信息 page:页码 size:每页条数
    List<PanghuCommunity> selectCommunityByPage(int page, int size);

    //5.模糊查找小区信息
    List<PanghuCommunity> selectCommunityByLike(String message);

    //6.查看关联门店
    List<AssociateShop> selectAssociateShop(int page, int size, int id);

    //7.模糊查找关联门店
    List<AssociateShop> selectAssociateLikeShop( int id, String message, int page, int size);

    //8.删除关联门店
    int deleteAssociateShop(int id);

    //9.查找要新增关联门店列表
    List<PanghuShop> selectAssociateAddShop();

    //10.模糊查找关联门店
    List<PanghuShop> selectAssociateLikeShop(String message);

    //11.添加关联门店
    int insertAssociateShop(int shopId, int communityId, int shopSort);

}
